package com.xiaoai.io.bio5file;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * 服务端，可以实现接收客户端任务一类型文件，并保存到服务端磁盘
 *
 * @Author
 * @Date 2021-09-06 22:26
 */
public class Server {

    public static void main(String[] args){

        System.out.println("=====服务端启动：file=====");
        ServerSocket ss = null;
        try {
            ss = new ServerSocket(8888);
            while (true){
                Socket socket = ss.accept();
                new ServerReaderThread(socket).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }


    }


}
